package com.csu.tingtian.service;

import com.csu.tingtian.common.CommonResponse;
import com.csu.tingtian.entity.LegalFarm;
import com.csu.tingtian.vo.FarmAndLevel;
import com.csu.tingtian.vo.ProduceComment;

import java.util.List;

public interface ProduceCommentService {
    CommonResponse<List<ProduceComment>> getProduceCommentByFarmName(String farmName);
    CommonResponse<ProduceComment> userSendCommentToProduce(ProduceComment produceComment);
    CommonResponse<ProduceComment> userDeleteComment(String itemId,String userName,String time);
    CommonResponse<List<ProduceComment>> userGetCommentByItemId(String itemId);
    CommonResponse<List<FarmAndLevel>> returnFarmNameStarIsTwoOrLower();

    //根据farmName找出所有评价，并计算星级的平均分
    int averageStarLevel(String farmName);

}
